<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/es_update/'.$cateid)?>">

	<h3>西班牙申根表</h3>
    <table width="100%">
    <thead>
        <tr>
          <td colspan="4" align="right"><img src="<?= (@$info->avatar)?@$info->avatar:'images/avatar.gif'?>" width="150" height="150" /></td>
		  <td align="right">
		  上传照片<br />
		  <input type="file" name="userphoto" /><br />
		  (.gif|.jpg|.png文件,最大1M)<br />
		  <?php if (@$info->attachment):?><a href="<?= @$info->attachment?>" target="_blank">点击下载附件</a><?php endif; ?>
		  &nbsp;&nbsp;&nbsp;&nbsp;上传附件<br />
		  <input type="file" name="userfile" /><br />
		  (.pdf|.zip|.rar|.doc,最大2M)		  </td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />			</td>
        </tr>
    </tfoot>

    <tbody>
        <tr class="odd">
            <td>1.Surname (Family name) (姓)</td>
            <td><input type="text" name="surname" value="<?= @$info->surname?>" /></td>
            <td>&nbsp;</td>
            <td>2.Surname at birth (Former family name)(出生时姓氏) </td>
            <td><input type="text" name="former" value="<?= @$info->former?>" /></td>
        </tr>
        <tr class="even">
            <td>3.First name (Given name) (名)</td>
            <td><input type="text" name="firstname" value="<?= @$info->firstname?>" /></td>
            <td>&nbsp;</td>
            <td>4.Date of birth (day-month-year)(出生日期 (日-月-年))</td>
            <td>
			<select name="birth_d"><?php for($i=1;$i<=31;$i++) echo "<option value='$i'".((@$info->birth_d==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="birth_m"><?php for($i=1;$i<=12;$i++) echo "<option value='$i'".((@$info->birth_m==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="birth_y"><?php for($i=2011;$i>1940;$i--) echo "<option value='$i'".((@$info->birth_y==$i)?"selected":"").">$i</option>"; ?></select>			</td>
        </tr>
		<tr class="odd">
            <td colspan="2">5.ID-number (optional)/身份证号码，(选填)</td>
            <td colspan="3"><input type="text" name="national_id" value="<?= @$info->national_id?>" /></td>
        </tr>
        <tr class="even">
            <td>6.Place of birth / 出生地</td>
            <td><input type="text" name="birth_place" value="<?= @$info->birth_place?>" /></td>
            <td>&nbsp;</td>
            <td>Country of birth / 出生国 </td>
            <td><input type="text" name="birth_country" value="<?= @$info->birth_country?>" /></td>
        </tr>
        <tr class="odd">
            <td>7.Current nationality / 现国籍</td>
            <td><input type="text" name="nationality" value="<?= @$info->nationality?>" /></td>
            <td>&nbsp;</td>
            <td>8.Original nationality (nationality at birth)/出生国籍</td>
            <td><input type="text" name="birth_nationality" value="<?= @$info->birth_nationality?>" /></td>
        </tr>
        <tr class="even">
        	<td>9.Sex / 性别</td>
        	<td><input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?> />
        		Male / 男
        		<input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?> />
        		Female / 女</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr class="odd">
            <td>10.Marital status / 婚姻状况</td>
            <td colspan="4">
			<input type="radio" name="marital_status" value="1" <?= (@$info->marital_status==1)?'checked':''?>/> Single / 未婚  &nbsp;&nbsp;
			<input type="radio" name="marital_status" value="2" <?= (@$info->marital_status==2)?'checked':''?>/> Married / 已婚<br />
            <input type="radio" name="marital_status" value="3" <?= (@$info->marital_status==3)?'checked':''?>/> Separated / 分居 <input type="radio" name="marital_status" value="4" <?= (@$info->marital_status==4)?'checked':''?>/> Divorced / 离异 <input type="radio" name="marital_status" value="5" <?= (@$info->marital_status==5)?'checked':''?>/> Widow (er) / 丧偶<br />
            <input type="radio" name="marital_status" value="0" <?= (@$info->marital_status==0)?'checked':''?>/> Other / 其它<input type="text" name="marital_status_other" value="<?= @$info->marital_status_other?>" /></td>
        </tr>
        <tr class="even">
			<td>11.Father’s name /父亲名</td>
        	<td><input type="text" name="father_name" value="<?= @$info->father_name?>" /></td>
        	<td>&nbsp;</td>
        	<td>12.Mother’s name/母亲名</td>
        	<td><input type="text" name="mother_name" value="<?= @$info->mother_name?>" /></td>
        	</tr>

        <tr class="odd">
            <td colspan="2">13.Type of passport /护照种类</td>
            <td colspan="3">
            	<p>
            		<input type="radio" name="travel_document_type" value="1" <?= (@$info->travel_document_type==1)?'checked':''?>/>             
            		National passport / 普通护照 <br />
            				<input type="radio" name="travel_document_type" value="2" <?= (@$info->travel_document_type==2)?'checked':''?>/> 
            		Diplomatic passport / 外交护照<br />
            				<input type="radio" name="travel_document_type" value="3" <?= (@$info->travel_document_type==3)?'checked':''?>/> 
            		Service passport / 公务护照 <br />
            				<input type="radio" name="travel_document_type" value="4" <?= (@$info->travel_document_type==4)?'checked':''?>/>            
            		Travel document (1951 Convention) / 旅行证件 <br />
            		<input type="radio" name="travel_document_type" value="5" <?= (@$info->travel_document_type==5)?'checked':''?>/>            
            		Alien’s passport / 外国人护照<br />
					<input type="radio" name="travel_document_type" value="6" <?= (@$info->travel_document_type==5)?'checked':''?>/>            
					Seaman’s passport/ 海员护照<br />
            		<input type="radio" name="travel_document_type" value="0" <?= (@$info->travel_document_type==0)?'checked':''?>/>
            		Other (please specify) / 其它旅行证件（请注明）：
            		<input type="text" name="travel_document_type_other" value="<?= @$info->travel_document_type_other?>" />
            		</p></td>
        </tr>
        <tr class="even">
            <td>14.Number of passport / 护照号</td>
            <td><input type="text" name="travel_document_num" value="<?= @$info->travel_document_num?>" /></td>
            <td>&nbsp;</td>
            <td>15.Issued by 签发机关</td>
            <td><input type="text" name="travel_document_issue_by" value="<?= @$info->travel_document_issue_by?>"/></td>
        </tr>
        <tr class="odd">
            <td>16.Date of issue 签发日期</td>
            <td><input type="text" name="travel_document_issue_date" value="<?= @$info->travel_document_issue_date?>" id="travel_document_issue_date" /></td>
            <td>&nbsp;</td>
            <td>17.Valid until 有效期至</td>
            <td><input type="text" name="travel_document_valid_date" value="<?= @$info->travel_document_valid_date?>" id="travel_document_valid_date"/></td>
        </tr>		
        <tr class="even">
            <td colspan="2">18. If you reside in a country other than your country of origin, have you permission to return to that country?/如果你的居住国不是你的国籍所在国，你是否被允许返回居住国？</td>
            <td colspan="3">
			<input type="radio" name="is_residence" value="0" <?= (@$info->is_residence==0)?'checked':''?>/> No 否<br />
            <input type="radio" name="is_residence" value="1" <?= (@$info->is_residence==1)?'checked':''?>/>
              Yes, (number and validity)/是，（号码和有效期至）<br />
			&nbsp;&nbsp;No.<input type="text" name="residence_num" value="<?= @$info->residence_num?>" /> <br />
			&nbsp;&nbsp;Valid until<input type="text" name="residence_valid_date" value="<?= @$info->residence_valid_date?>" id="residence_valid_date" /></td>
        </tr>
        <tr class="odd">
            <td>*19.Current occupation 现职业</td>
            <td><input type="text" name="occupation" value="<?= @$info->occupation?>"/></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr class="even">
            <td colspan="2">
            *20.Employer and employer’s address and telephone number. <br>
            For students, name and address of educational establishment.<br>
            工作单位名称，地址和电话，学生填写学校名称及地址</td>
            <td colspan="3">
            name<input type="text" name="employer_name" value="<?= @$info->employer_name?>" /><br />
			address<input type="text" name="employer_address" value="<?= @$info->employer_address?>" /><br />
			telephone<input type="text" name="employer_telephone" value="<?= @$info->employer_telephone?>" /><br />			</td>
        </tr>
		<tr class="odd">
			<td class="odd">21.Main destination/
				主要目的地</td>
			<td class="odd"><input type="text" name="main_destination" value="<?= @$info->main_destination?>" /></td>
			<td></td>
			<td>22.  Type of Visa / 签证类型<br /></td>
			<td>
			<input type="radio" name="visa_type" value="1" <?= (@$info->visa_type==1)?'checked':''?>/>Airport transit / 机场过境<br /> 
			<input type="radio" name="visa_type" value="2" <?= (@$info->visa_type==1)?'checked':''?>/>Transit / 途经<br />
			<input type="radio" name="visa_type" value="3" <?= (@$info->visa_type==1)?'checked':''?>/>Short stay / 短暂停留<br />
			<input type="radio" name="visa_type" value="4" <?= (@$info->visa_type==1)?'checked':''?>/>Long stay / 长期停留			</td>
		</tr>
		<tr class="even">
			<td>23.Visa / 签证方式<br /></td>
			<td><input type="radio" name="visa_method" value="1" <?= (@$info->visa_method==1)?'checked':''?>/>
				Individual/个人
					<input type="radio" name="visa_method" value="2" <?= (@$info->visa_method==2)?'checked':''?>/>
					Collective/团体</td>
			<td></td>
			<td></td>
			<td></td>
		</tr>
		<tr class="odd">
			<td>24.Number of entries requested <br />
				申请入境次数</td>
			<td><input type="radio" name="entry_num" value="1" <?= (@$info->entry_num==1)?'checked':''?> />
				Single entry / 一次
				<input type="radio" name="entry_num" value="2" <?= (@$info->entry_num==2)?'checked':''?> />
				Two entries / 两次
				<input type="radio" name="entry_num" value="3" <?= (@$info->entry_num==3)?'checked':''?> />
				Multiple entries / 多次 </td>
			<td>&nbsp;</td>
			<td>25.Duration of stay <br />
				Visa is requested for:<br />
				预计逗留或过境日数</td>
			<td><input type="text" name="stay_days" value="<?= @$info->stay_days?>" /></td>
		</tr>
		<tr class="even">
			<td colspan="5">26. Other visas (issued during the past three years) and their period of validity/其它签证（最近三年内）及有效期至：
				<input type="text" name="other_visa_validity" value="<?= @$info->other_visa_validity?>" id="other_visa_validity"/></td>
			</tr>
		<tr class="odd">
			<td>27. In the case of transit, have you an entry permit for the final country of destination?/如需过境，你是否有进入最终目的国家的入境许可 ?</td>
			<td colspan="4">
			<input type="radio" name="is_final_country" value="0" <?= (@$info->is_final_country==0)?'checked':''?>/>No / 没有<br />
			<input type="radio" name="is_final_country" value="1" <?= (@$info->is_final_country==1)?'checked':''?>/>Yes. valid until/有效期至:
				<input type="text" name="final_country_issued_until" value="<?= @$info->final_country_issued_until?>" id="final_country_issued_until"/>
				Issuing authority/ 签发机关:
				<input type="text" name="final_country_issued_by" value="<?= @$info->final_country_issued_by?>"/></td>
		</tr>
		<tr class="even">
			<td colspan="5">*28. Previous stays in this or other Schengen states/以前在本申根国或其它申根国停留情况： <br />
			<input type="text" name="stay_states" value="<?= @$info->stay_states?>" size="50"/>
			</td>
		</tr>
		<tr class="odd">
			<td>29.Purpose of travel: <br />
				旅程主要目的</td>
			<td colspan="4">
			<input type="radio" name="travel_purpose" value="1" <?= (@$info->travel_purpose==1)?'checked':''?>/>Tourism / 旅游
			<input type="radio" name="travel_purpose" value="2" <?= (@$info->travel_purpose==2)?'checked':''?>/>Business / 商务
			<input type="radio" name="travel_purpose" value="3" <?= (@$info->travel_purpose==3)?'checked':''?>/>Visit to Family or Friends / 探亲访友<br />
			<input type="radio" name="travel_purpose" value="4" <?= (@$info->travel_purpose==4)?'checked':''?>/>Cultural / Sports / 文化/体育
			<input type="radio" name="travel_purpose" value="5" <?= (@$info->travel_purpose==5)?'checked':''?>/>Official  / 官方
			<input type="radio" name="travel_purpose" value="6" <?= (@$info->travel_purpose==6)?'checked':''?>/>Medical reasons / 医疗<br />
			<input type="radio" name="travel_purpose" value="0" <?= (@$info->travel_purpose==0)?'checked':''?>/>Other (please specify) / 其它 (请注明）
			<input type="text" name="travel_purpose_other" value="<?= @$info->travel_purpose_other?>" /></td>
		</tr>
        <tr class="even">
			<td>*30.Date of arrival <br /> 预定入境日期</td>
        	<td><input type="text" name="intended_arrival_date" value="<?= @$info->intended_arrival_date?>" id="intended_arrival_date"/></td>
        	<td>&nbsp;</td>
        	<td>*31.Date of departure <br />预定离开日期</td>
        	<td><input type="text" name="intended_departure_date" value="<?= @$info->intended_departure_date?>" id="intended_departure_date"/></td>
        	</tr>

        <tr class="odd">
            <td>*32.Border of first entry or transit route第一入境或者过境的路线</td>
            <td><input type="text" name="entry_route" value="<?= @$info->entry_route?>" /></td>
            <td>&nbsp;</td>
            <td>*33.Means of transport<br />
            	交通方式</td>
            <td><input type="text" name="entry_transport" value="<?= @$info->entry_transport?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">*34.Name of host or company in the Schengen states and contact person in host company. If 
            	not applicable, give name of hotel or temporary address in the Schengen states</td>
            </tr>
        <tr class="odd">
			<td>Name /联系人 </td>
        	<td><input type="text" name="contact_name" value="<?= @$info->contact_name?>"/></td>
        	<td></td>
        	<td>e-mail address/电子邮件</td>
        	<td><input type="text" name="contact_email" value="<?= @$info->contact_email?>" id="email" /></td>
        	</tr>
		<tr class="even">
			<td>Telephone/电话</td>
			<td><input type="text" name="contact_tel" value="<?= @$info->contact_tel?>"/></td>
			<td></td>
			<td> telefax/传真</td>
			<td><input type="text" name="contact_fax" value="<?= @$info->contact_fax?>"/></td>
		</tr>
		<tr class="odd">
			<td>Full address/地址</td>
			<td colspan="4"><input type="text" name="contact_address" value="<?= @$info->contact_address?>" size="50"/></td>
			</tr>
		<tr class="even">
			<td colspan="5">*35.Who is paying for your cost of travelling and for your costs of living during your stay?谁支付旅行以及在停留期间的生活费用</td>
			</tr>
		<tr class="odd">
			<td colspan="5">
			<input type="radio" name="cost_by" value="1" <?= (@$info->cost_by==1)?'checked':''?>/>Myself/自己 
			<input type="radio" name="cost_by" value="2" <?= (@$info->cost_by==2)?'checked':''?>/>Host person/s/邀请人  
			<input type="radio" name="cost_by" value="3" <?= (@$info->cost_by==3)?'checked':''?>/>Host company/邀请公司.<br />
				 State who and how and present corresponding documentation/请注明何人和如何支付，并出示相关材料:
				 <input type="text" name="cost_state" value="<?= @$info->cost_state?>" size="50"/>			</td>
			</tr>
		<tr class="even">
			<td colspan="5">* 36. Means of support during your stay/在国外停留期间的费用支付方式：</td>
			</tr>
		<tr class="odd">
			<td colspan="5">
			<input type="radio" name="cost_type" value="1" <?= (@$info->cost_type==1)?'checked':''?>/>Cash/现金 
			<input type="radio" name="cost_type" value="2" <?= (@$info->cost_type==2)?'checked':''?>/>Travellers' cheques/旅行支票
			<input type="radio" name="cost_type" value="3" <?= (@$info->cost_type==3)?'checked':''?>/>Credit cards/信用卡<br />
			<input type="radio" name="cost_type" value="4" <?= (@$info->cost_type==4)?'checked':''?>/>Accommodation/有住房 
			<input type="radio" name="cost_type" value="0" <?= (@$info->cost_type==0)?'checked':''?>/>Other:/其它：
			<input type="text" name="cost_type_other" value="<?= @$info->cost_type_other?>" /><br /> 
			Travel and/or health insurance. Valid until: /旅行或医疗保险有效期至：
			<input type="text" name="insurance_until" value="<?= @$info->insurance_until?>" />			</td>
			</tr>		
        <tr class="even">
            <td>37. Spouse’s family name/配偶姓</td>
            <td><input type="text" name="spouse_surname" value="<?= @$info->spouse_surname?>" /></td>
        	<td>&nbsp;</td>
        	<td>38. Spouse’s family name at birth/配偶原姓</td>
        	<td><input type="text" name="spouse_former" value="<?= @$info->spouse_former?>" /></td>
        </tr>
        <tr class="odd">
            <td>39. Spouse’s first name/配偶名</td>
            <td><input type="text" name="spouse_firstname" value="<?= @$info->spouse_firstname?>" /></td>
        	<td>&nbsp;</td>
        	<td>40. Spouse’s date of birth/配偶出生日期：</td>
        	<td><input type="text" name="spouse_birth" value="<?= @$info->spouse_birth?>" /></td>
        </tr>
        <tr class="even">
            <td>41. Spouse’s place of birth/配偶出生地：</td>
            <td><input type="text" name="spouse_birth_place" value="<?= @$info->spouse_birth_place?>" /></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr class="odd">
            <td colspan="5">42. Children  (Applications must be submitted separately for each passport)/子女（持单独护照的子女必须分别递交申请）</td>
			</tr>
        <tr class="even">
            <td colspan="5">&nbsp;&nbsp;Name /姓 &nbsp;&nbsp;First name/名 &nbsp;&nbsp;Date of birth/出生日期<br />
            	1.
            		<input type="text" name="child_surname1" value="<?= @$info->child_surname1?>" />
            		<input type="text" name="child_firstname1" value="<?= @$info->child_firstname1?>" />
            		<input type="text" name="child_birth1" value="<?= @$info->child_birth1?>" />
            		<br />
            	2.
            		<input type="text" name="child_surname2" value="<?= @$info->child_surname2?>" />
            		<input type="text" name="child_firstname2" value="<?= @$info->child_firstname2?>" />
            		<input type="text" name="child_birth2" value="<?= @$info->child_birth2?>" />
				<br />
            	3.
            		<input type="text" name="child_surname3" value="<?= @$info->child_surname3?>" />
            		<input type="text" name="child_firstname3" value="<?= @$info->child_firstname3?>" />
            		<input type="text" name="child_birth3" value="<?= @$info->child_birth3?>" />				</td>
            </tr>
        <tr class="odd">
            <td colspan="5">43.Personal data of the EU or EEA citizen you depend
            	on. This question should be answered only by family members of EU or EEA citizens.<br />
            	涉及您依靠的欧盟或欧洲经济区公民的个人资料，仅需与欧盟或欧洲经济区公民有亲属关系的申请人填写：</td>
            </tr>
        <tr class="even">
            <td>Name /姓
            	<input type="text" name="eu_surname" value="<?= @$info->eu_surname?>" /></td>
            <td>First Name/名
            	<input type="text" name="eu_firstname" value="<?= @$info->eu_firstname?>" /></td>
            <td>&nbsp;</td>
            <td>Date of Birth/出生日期</td>
            <td><input type="text" name="eu_birth" value="<?= @$info->eu_birth?>" /></td>
        </tr>
        <tr class="odd">
            <td>Nationality/国籍
            	<input type="text" name="eu_nationality" value="<?= @$info->eu_nationality?>" /></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>Number of passport/护照号码</td>
            <td><input type="text" name="eu_passport" value="<?= @$info->eu_passport?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">Family relationship : /与欧盟或欧洲经济区公民的亲属关系：
            	<input type="text" name="eu_relationship" value="<?= @$info->eu_relationship?>" />             
            	of an EU or EEA citizen</td>
        	</tr>
        <tr class="odd">
            <td colspan="5">44. I am aware of and consent to the following: any personal data concerning me which appear on this visa application form will be supplied to the relevant authorities in the Schengen states and processed by those authorities, if necessary, for the purposes of a decision on my visa application.  Such data may be input into, and stored in, databases accessible to the relevant authorities in the various Schengen states. At my express request, the consular authority processing my application will inform me of the manner in which I may exercise my right to check the personal data concerning me and have them altered or deleted, in particular, should they be inaccurate, in accordance with the national law of the state concerned. I declare that to the best of my knowledge all particulars supplied by me are correct and complete. I am aware that any false statements will lead to my application being rejected or to the annulment of a visa already granted and may also render me liable to prosecution under the law of the Schengen state which deals with the application. I undertake to leave the territory of the Schengen states upon the expiry of the visa, if granted. I have been informed that possession of a visa is only one of the prerequisites for entry into the European territory of the Schengen states. The mere fact that a visa has been granted to me does not mean that I will be entitled to compensation if I fail to comply with the relevant provisions of Article 5.1 of the Schengen Implementing Convention and am thus refused entry. The prerequisites for entry will be checked again on entry into the European territory of the Schengen states.<br />
            	/我知道并同意以下条款：本签证申请表上关于我的任何个人资料，将被提交给有关申根国家的相应机构，以便用于审理我的签证申请。此资料可以被输入并存储在申根国家的相关机构的数据库中，并由各申根国家的有关机构使用。如我明确请求，对我的申请进行审理的使领馆应通知我，以何种方式可以行使核查有关我的个人资料并依据有关国家法律规定更改或消除错误数据的权利。我声明，就我所知，我提供的一切资料都是正确和完整的。我知道，任何虚假陈述都将导致拒绝签证或已发签证的废止，也可以根据对我的申请进行审理的申根国家的法律规定进行刑事追究。如果签证申请被批准，我保证在签证到期时离开申根国家领土。我获悉，拥有签证只是进入欧洲申根国家领土其中的一个条件，如果没有履行申请执行公约第五条第一款规定的条件而被拒绝入境，那么仅仅拥有签证并不意味着我有权就此要求赔偿。在进入欧洲申根国家的领土时，入境条件将被再次审查。<br /></td>
            </tr>
        <tr class="even">
            <td>45. Applicant’s home address /申请人家庭地址</td>
        	<td><input type="text" name="applicant_address" value="<?= @$info->applicant_address?>" /></td>
        	<td>&nbsp;</td>
        	<td>46. Telephone number /电话号码</td>
        	<td><input type="text" name="applicant_tel" value="<?= @$info->applicant_tel?>" /></td>
        </tr>
        <tr class="odd">
            <td>47. Place and  date  /申请地点和日期</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>place
            	<input type="text" name="applicant_place" value="<?= @$info->applicant_place?>" /></td>
            <td>date
            	<input type="text" name="applicant_date" value="<?= @$info->applicant_date?>" id="applicant_date" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">&nbsp;</td>
        </tr>
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
		surname: {
		 required:true
		},
		firstname: {
		 required:true
		},
		sex:{
		 required:true
		},
		marital_status:{
		 required:true
		},
		national_id:{
		 required:true,
		 rangelength:[10,30]
		},
		travel_document_type:{
		 required:true
		},
		is_residence:{
		 required:true
		},
		travel_purpose:{
		 required:true
		},
		entry_num:{
		 required:true
		},
		cost_by:{
		 required:true
		},
		cost_type:{
		 required:true
		}
    }
  });
  
	$( "#travel_document_issue_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true

	});
	$( "#travel_document_valid_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#residence_valid_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});

	$( "#other_visa_validity" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#final_country_issued_until" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#intended_arrival_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#intended_departure_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	$( "#applicant_date" ).datepicker({
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
	});
	
	$("#email").autoMail();

	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>